Skip to content

Conversation

Jolanrensen
Copy link
Collaborator

explored experimental generics in kotlin contracts and what they could bring to dataframe

Shall we adopt it? or wait until it's not experimental anymore?


public fun AnyCol.isList(): Boolean = typeClass == List::class
public fun AnyCol.isList(): Boolean {
contract { returns(true) implies (this@isList is ValueColumn<List<*>>) }
Copy link
Collaborator

@koperagen koperagen Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to consider nullability: List<*>?
is it safe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh you're right, should indeed be List<*>?

@zaleslaw
Copy link
Collaborator

zaleslaw commented Oct 2, 2025

Fine to have an experinmental PR, but to early to use this feature in 1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants